package com.kyw.controller;

import com.github.pagehelper.PageInfo;
import com.kyw.model.entity.Healtheducation;
import com.kyw.model.vo.common.Result;
import com.kyw.model.vo.common.ResultCodeEnum;
import com.kyw.service.HealtheducationService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/healtheducation/healtheducation")
public class HealtheducationController {

    @Autowired
    private HealtheducationService healtheducationService;

    @GetMapping(value = "/findHealtheducation/{page},{limit}")
    public Result<PageInfo<Healtheducation>> findHealtheducation(@PathVariable Integer page, @PathVariable Integer limit) {
        PageInfo<Healtheducation> healtheducation1 = healtheducationService.findHealtheducation(page, limit);
        return Result.build(healtheducation1, ResultCodeEnum.SUCCESS);
    }
}
